﻿using System;

namespace Program05
{
    class Program
    {
        //张三 男 18 三科成绩为:90 95 80 总分和平均分
        //小兰 女 16 三科成绩为:95 85 100 总分和平均分
        static void Main(string[] args)
        {
            var achievement1 = new Achievement
            {
                Name = "小张",
                Sex = true,
                Age = 18,
                Chines = 90,
                Mathematics = 95,
                English = 80
            };
            var achievement2 = new Achievement
            {
                Name = "小兰",
                Sex = false,
                Age = 16,
                Chines = 95,
                Mathematics = 85,
                English = 100
            };
            Console.WriteLine("{0} {1} 年龄{2} 三科成绩为：90 95 80总分{3}和平均分{4}", achievement1.Name, achievement1.Sex ? "男" : "女", achievement1.Age, Achievement.Sum(90, 95, 80), Achievement.Average(90, 95, 80));
            Console.WriteLine("{0} {1} 年龄{2} 三科成绩为：90 95 80总分{3}和平均分{4}", achievement2.Name, achievement2.Sex ? "男" : "女", achievement2.Age, Achievement.Sum(95, 85, 100), Achievement.Average(95, 85, 100));
            Console.WriteLine();
            Console.WriteLine("{0} {1} 年龄{2} 三科成绩为：90 95 80总分{3}和平均分{4}", achievement1.Name, achievement1.Sex ? "男" : "女", achievement1.Age, achievement1.Sum(), achievement1.Average());
            Console.WriteLine("{0} {1} 年龄{2} 三科成绩为：90 95 80总分{3}和平均分{4}", achievement2.Name, achievement2.Sex ? "男" : "女", achievement2.Age, achievement2.Sum(), achievement2.Average());
        }
    }
}
